//
//  MCUtils.h
//  MCPublicModule
//
//  Created by Mirko on 15/12/23.
//  Copyright (c) 2015年 Mirko. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface MCUtils : NSObject

+(NSString *) mc_DocumentPath;
+(BOOL) createFolder:(NSString *) folderPath;

+(NSBundle *) MCPMBundle;
+(UIImage *) mcImageWithName:(NSString *) imgName;


#pragma mark Date Tools
//持续时间用  时间格式表示。
+(NSString *) durationToStringHToS :(double ) duration;
+(NSString *) durationToStringMToS :(double ) duration;

//年到秒
+(NSString *) dateIntervalToStringYToS:(NSTimeInterval) interval;
+(NSString *) dateToStringYToS:(NSDate *) dstDate;
+(NSDate *) stringToDateYToS:(NSString *) dstStr;
//年到天/Users/lutianlei/SVN/HDGoldConsultant/HDGoldConsultantProject/HDGoldConsultant/GCTabbarViewController/GCDiscoveryViewController/Classes/GCCommentItemTable.h
+(NSString *) dateIntervalToStringYToD:(NSTimeInterval) interval;
+(NSString *) dateToStringYToD:(NSDate *) dstDate;
+(NSDate *) stringToDateYToD:(NSString *) dstStr;
//根据日期获得时间状态：刚刚，今天，昨天等等
+ (NSString *)getTimeStrByDate:(NSDate *)date;
+ (NSString *)getTimeStrByTimeInterval:(NSTimeInterval) interval;
+ (NSDate *)dateFromString:(NSString *)dateString;
//bufb
+ (NSString *) getDate;
+ (NSString *)getWeekDate;

#pragma mark NSString Tools
// 替换掉换行符
+ (NSString *)mStringRemoveLineBreaksWithString:(NSString *)string;

#pragma mark version Tools
+ (NSString *) appReleaseVersion;
+ (NSString *) appBuildVersion;
+ (NSComparisonResult) compareVersion:(NSString *) lastVersion current:(NSString *) currentVersion;


@end

CGSize ScreenSize();
CGFloat ScreenWidth();
CGFloat ScreenHeigth();

//等比缩放，宽，高，区域
CGFloat RelWidth(CGFloat dWidth);
CGFloat RelHeight(CGFloat dHeight);
CGRect RelBounds(CGRect dRect);
CGRect RelRect(CGRect dRect);

//剩余宽度，用于屏幕适配  dWidth 开发宽度为iphone6上的宽度
CGFloat RemainWidth(CGFloat dWidth);
CGFloat RemainHeight(CGFloat dHeight);

//根据屏幕宽度计算高度
CGFloat RelHeightWithSWidth(CGFloat dHeight);



